#ifndef __MC_FOC_H
#define __MC_FOC_H

#include "stdint-gcc.h"
#include "mc_param.h"
#include "mc_math.h"

typedef enum
{
  sector_null,
  sector_one,
  sector_two,
  sector_three,
  sector_four,
  sector_five,
  sector_six,
  sector_seven,
}sector_number;

void virtual_foc(Motor_t* motor);
void foc_control(Motor_t *motor);
uint8_t sector_judgment(AlphaBeta_t input);
int8_t pwm_duty_out(AlphaBeta_t input, uint16_t tim_arr, uint8_t sector, Uvw_t* uvw);

#endif